package cn.code.springboot3pagehelper.controller;


import cn.code.springboot3pagehelper.pojo.entity.WxUserinfo;
import cn.code.springboot3pagehelper.service.IUserService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/wx/userinfo")
public class WxUserController {

    @Autowired
    private IUserService userService;


    @GetMapping
    public  PageInfo<WxUserinfo> hello(){
        int pageNum = 3;
        int pageSize = 5;
        PageInfo<WxUserinfo> userList = userService.getUserList(pageNum, pageSize);
        System.out.println(userList);
        return userList;
    }


}
